package com.fp.helig.Res;

import java.net.URISyntaxException;

import org.anddev.andengine.engine.Engine;
import org.anddev.andengine.ui.activity.BaseGameActivity;
import org.simpleframework.xml.Serializer;
import org.simpleframework.xml.core.Persister;

import android.util.Log;

public class LevelLoader {
	
public Level params;
	
	public void load(final BaseGameActivity activity,final Engine engine, String levelName) throws URISyntaxException{
		
		Serializer serializer = new Persister();
	
		try {
			params = serializer.read(Level.class,activity.getAssets().open("xml/levels/"+levelName+".xml"));
			
		} catch (Exception e) {
			// TODO Auto-generated catch block
		//	Log.v("NO FILE LEvel", "dsfsdf");
			e.printStackTrace();
		}
	}
}
